﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DbUpgradeOpenGauss
{
    public partial class FormEditVersion : Form
    {
        public string SqlTitle = "";
        public FormEditVersion(string title)
        {
            InitializeComponent();
            this.SqlTitle = title;
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            string title = edtTitle.Text;
            if (string.IsNullOrEmpty(title))
            {
                MessageBox.Show("标题不能为空");
            }
            else
            {
                SqlTitle = title;
                DialogResult = DialogResult.OK;
            }
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
        }

        private void FormEditVersion_Load(object sender, EventArgs e)
        {
            edtTitle.Text = SqlTitle;
        }
    }
}
